/*折线图*/
var all_line = echarts.init(document.getElementById('all_line'),'macarons');
var store_line = echarts.init(document.getElementById('store_line'),'macarons');

var lineOption = {
  tooltip : {
      trigger: 'axis'
  },
  legend: {
      data:['现金','支付宝','微信','其他']
  },
  calculable : true,
  xAxis : [
      {
          type : 'category',
          boundaryGap : false,
          data : ['周一','周二','周三','周四','周五'],
          axisLine: {
          	lineStyle: {
          		color: '#484848'
          	}
          }
      }
  ],
  yAxis : [
      {
          type : 'value',
          min : 0,
          max : 100,
          axisLabel: {
          		formatter: '{value}%'
          },
          axisLine: {
          	lineStyle: {
          		color: '#484848'
          	}
          }
      }
  ],
  series : [
      {
          name:'现金',
          type:'line',
          smooth:true,
          data:[10, 12, 21, 54, 26, 83, 71]
      },
      {
          name:'支付宝',
          type:'line',
          smooth:true,
          data:[30, 12, 34, 71, 39, 30, 10]
      },
      {
          name:'微信',
          type:'line',
          smooth:true,
          data:[10, 22, 14, 21, 29, 20, 17]
      },
      {
          name:'其他',
          type:'line',
          smooth:true,
          data:[32, 13, 60, 34, 12, 10, 20]
      }
  ]
};

all_line.setOption(lineOption);	//总体支付
store_line.setOption(lineOption);	//店铺支付

/*折线图 END*/



/*饼图*/
var all_pie = echarts.init(document.getElementById('all_pie'),'macarons');
var store_pie = echarts.init(document.getElementById('store_pie'),'macarons');

var pieOption = {
    tooltip : {
        trigger: 'item',
        formatter: "{a} <br/>{b} : {c} ({d}%)"
    },
    series : [
        {
            name: '支付统计',
            type: 'pie',
            radius : '55%',
            center: ['50%', '60%'],
            data:[
                {value:33, name:'现金'},
                {value:31, name:'支付宝'},
                {value:23, name:'微信'},
                {value:13, name:'其他'}
            ],
            itemStyle: {
                emphasis: {
                    shadowBlur: 10,
                    shadowOffsetX: 0,
                    shadowColor: 'rgba(0, 0, 0, 0.5)'
                }
            }
        }
    ]
};

all_pie.setOption(pieOption);	//总体支付
store_pie.setOption(pieOption);	//店铺支付
/*饼图END*/